package com.zmytest.annotation.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created on 2018/12/29.
 *
 * @author zhangmingyu
 */
@RestController
@RequestMapping("/annotation/bean")
public class BeanTestController2 {

    @Autowired
    private BeanTest beanTest;

    @GetMapping("/test2")
    public void test(){
        beanTest.setName("zmytest");
        System.out.println(beanTest);
        System.out.println(beanTest.getName());
    }
}
